//
//  ReleaseConferenceViewController.m
//  Gxj
//
//  Created by 💋索少杰 on 2017/9/8.
//  Copyright © 2017年 wkq. All rights reserved.
//

#import "ReleaseConferenceViewController.h"
#import "MeetingView.h"

@interface ReleaseConferenceViewController ()<UIScrollViewDelegate>
@property(nonatomic, strong) MeetingView * meetingView;
@property(nonatomic, strong) UIScrollView * scrollView;//滚动视图
@end

@implementation ReleaseConferenceViewController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    [self.navigationController.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];
    //去掉导航栏底部的黑线
    self.navigationController.navigationBar.shadowImage = [UIImage new];
}
//- (void)viewWillDisappear:(BOOL)animated {
//    [super viewWillDisappear:animated];
//    [self.navigationController.navigationBar setBackgroundImage:nil forBarMetrics:UIBarMetricsDefault];
//    [self.navigationController.navigationBar setShadowImage:nil];
//}
- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    
    //导航条
    self.automaticallyAdjustsScrollViewInsets = NO;
    self.navigationController.navigationBar.translucent = YES;
    self.navigationController.navigationBar.tintColor = [UIColor whiteColor];
    self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName:[UIColor whiteColor],NSFontAttributeName:[UIFont boldSystemFontOfSize:17]};
    [self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"bg"]forBarMetrics:UIBarMetricsDefault];
    
    //导航条左边按钮
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"guanbi"] style:UIBarButtonItemStyleDone target:self action:@selector(clickLeftBarButton)];
    
    //滚动视图
    _scrollView=[[UIScrollView alloc] initWithFrame:self.view.bounds];
    _scrollView.contentSize=CGSizeMake(self.view.frame.size.width, kHeightScale(670));
    _scrollView.backgroundColor=[UIColor colorWithPatternImage:[UIImage imageNamed:@"bg_edit"]];
    _scrollView.delegate=self;
    [self.view addSubview:_scrollView];

    
    [self setMeetingView];
}

- (void)setMeetingView{
    
    self.view.backgroundColor = [UIColor whiteColor];
    _meetingView=[[MeetingView alloc] initWithFrame:CGRectMake(0, 64, UIScreenWidth, UIScreenHeight)];
    //_meetingView.backgroundColor=[UIColor colorWithPatternImage:[UIImage imageNamed:@"bg"]];
    
    
    [self.scrollView addSubview:_meetingView];
    
}

- (void)clickLeftBarButton
{
    [self.navigationController popViewControllerAnimated:YES];
}

#pragma mark - 点击空白回收键盘
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    [self.view endEditing:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
